CREATE VIEW [dbo].[v_studentDetail_dq]
AS
SELECT CK_StudentInfo.CK_StudentInfoId,  CK_SchoolTab.CK_SchoolTabName, CK_StudentInfo.stdtName
, CK_StudentClassInfo.CK_StudentClassInfoId, CK_StudentClassInfo.inClsDate
,CK_ClassTab.CK_ClassTabID
, CK_ClassTab.CK_className, CK_CourseTab.CK_course
, CK_RecvMoneyWayTab.CK_RecvMoneyWayName chargeType, CK_TeacherTab.CK_TeacherName, CK_StudentClassInfo.detailMemo, CK_StudentClassInfo.state
, CK_StudentClassInfo.isPayIn, CK_StudentClassInfo.isPayOut,CK_StudentClassInfo.insTblName, CK_StudentClassInfo.nextPayinDate
, CK_StudentInfo.sex, CK_StudentInfo.education, CK_StudentInfo.birthday, CK_StudentInfo.enterDate
, CK_StudentInfo.currSchool,CK_StudentInfo.grade, CK_StudentInfo.mobile, CK_StudentInfo.tel, CK_StudentInfo.linkAddr, CK_StudentInfo.postcode
, CK_StudentInfo.eMail, CK_StudentInfo.qqMsn
, CK_StudentInfo.motherName, CK_StudentInfo.motherMobile, CK_StudentInfo.motherTel
, CK_StudentInfo.motherWorkUnit, CK_StudentInfo.stdtMemo, CK_StudentInfo.fpNO, CK_StudentInfo.cardNO
FROM CK_StudentInfo 
JOIN CK_StudentClassInfo ON CK_StudentInfo.CK_StudentInfoId = CK_StudentClassInfo.CK_StudentInfoId
JOIN CK_SchoolTab		ON CK_StudentInfo.CK_SchoolTabId = CK_SchoolTab.CK_SchoolTabId
JOIN CK_ClassTab		ON CK_ClassTab.CK_ClassTabID = CK_StudentClassInfo.CK_ClassTabID
JOIN CK_TeacherTab		ON CK_ClassTab.CK_TeacherTabID = CK_TeacherTab.CK_TeacherTabID 
JOIN CK_CourseTab		ON CK_ClassTab.CK_CourseTabID = CK_CourseTab.CK_CourseTabID
JOIN CK_RecvMoneyWayTab ON CK_ClassTab.CK_RecvMoneyWayTabID = CK_RecvMoneyWayTab.CK_RecvMoneyWayTabID